﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using Module.Core.DAO;
using Module.Core.DAO.DAO;
using Module.Core.EntitiesInfo.TablesInfo;

namespace Module.Core.BusinessLogic.ProductCart
{
   public class ProductOrderDetailsBL
    {
        /// <summary>
        /// Saves a record to the ProductCart table.
        /// </summary>
       public static void Update(ProductOrderDetailsInfo productCartInfo)
        {
            try
            {
                new ProductOrderDetailsDAO().Update(productCartInfo);
            }
            catch (Exception ex)
            {
                throw;
            }

        }

       public static void Insert(ProductOrderDetailsInfo productCartInfo)
       {
           try
           {
               new ProductOrderDetailsDAO().Insert(productCartInfo);
           }
           catch (Exception ex)
           {
               throw;
           }

       }
        /// <summary>
        /// Delete a record from the ProductCart table.
        /// </summary>
       public static void Delete(int orderIdDe)
        {
            try
            {
                new ProductOrderDetailsDAO().Delete(orderIdDe);
            }
            catch (Exception ex)
            {
                throw;
            }

        }

       public static ProductOrderDetailsInfo Select(int orderIdDe)
       {
           try
           {
               return new ProductOrderDetailsDAO().Select(orderIdDe);
           }
           catch (Exception ex)
           {
               throw;
           }

       }

       public static DataSet ListProductOrderDetails(int orderId)
       {
           try
           {
               DataSet ds = new DataSet();

               ds = new ProductOrderDetailsDAO().ListProductOrderDetails(orderId);
               if (ds != null)
                   return ds;
               return null;
           }
           catch (Exception ex)
           {
               throw;
           }

       }
    }
}
